package Utils.word;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 隼 on 2017/6/2.
 */

public class ItextUtilTest {

    @Before
    public void setUp() throws Exception {
    }

    @After
    public void tearDown() throws Exception {
    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    @Test
    public void test() {
        try {
            List list = new ArrayList();
            for (int i = 0; i < 5; i++) {
                Student stu = new Student();
                stu.setName("chj" + i);
                stu.setAge(String.valueOf((i + 1) * 10));
                if (i % 2 == 0) {
                    stu.setGendar("male");
                } else {
                    stu.setGendar("female");
                }
                list.add(stu);
            }
            ItextUtil.getPDF(list);
        } catch (Exception e) {

            e.printStackTrace();
        }
    }

}

